1) The main dataset is master_dataset.csv.

2) The R script "random_forest_MI.R" recovers missingness on controls by chaining random forests. NB. be sure to use the seed to have the same results. Read in master_dataset.csv, execute the file, and then export to master_dataset_RF_MI.csv.

3) The main analysis file is sending_ketchley_andersen_RIO.do. Read in master_dataset_RF_MI.csv to Stata and execute. NB. The data wrangling and analyses use several user-written Stata packages that can be downloaded from the ssc library. See the annotations in the .do file. 

4) "GWF Autocratic Regimes.xlsx" is the Geddes, Wright and Frantz dataset analysed on P.21, fn.9. Read this in to Stata and merge to the main dataset.

5) The log file "sending_ketchley_andersen_RIO_log.txt" shows the Stata output.